from rest_framework import serializers
from xyz.models import Article

class ArticlecreateSerializer(serializers.ModelSerializer):
    '''发布文章'''
    user = serializers.PrimaryKeyRelatedField(read_only=True)

    class Meta:
        model = Article
        fields = '__all__'